package com.lm.boot.controller;

import com.lm.boot.dto.UserDto;
import com.lm.boot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
@RequestMapping("/redis")
public class RedisController {

    @Autowired
    private UserService userService;

    @RequestMapping("/userById")
    public UserDto reqUserInfo(@RequestParam Integer id){
        return  userService.findUserById(id);
    }
}
